package com.strange.mdl.module.mdl.controller.app.index;

import com.strange.mdl.framework.common.pojo.CommonResult;
import com.strange.mdl.module.mdl.controller.app.index.vo.AppIndexRespVO;
import com.strange.mdl.module.mdl.service.activity.ActivityService;
import com.strange.mdl.module.mdl.service.index.IndexService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.annotation.security.PermitAll;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import static com.strange.mdl.framework.common.pojo.CommonResult.success;

@Tag(name = "用户 APP - 首页")
@RestController
@RequestMapping("/mdl/appIndex")
@Validated
public class AppIndexController {

    @Resource
    private IndexService indexService;


    @GetMapping("/get")
    @PermitAll
    @Operation(summary = "首页数据")
    public CommonResult<AppIndexRespVO> getActivity() {
        AppIndexRespVO appIndex = indexService.getAppIndex();
        return success(appIndex);
    }



}